package com.quark.framework.base;

import com.quark.framework.configuration.QuarkConfigBase;
import com.quark.network.service.servlet.QuarkServletUploadService;

public class QuarkEnvironment{

	static QuarkEnvironment inst = new QuarkEnvironment();
	//pojo props
	public static String appCharset = "GB2312";
	
	public static Integer attrPageSize = 10;
	
	public static String paramManagerPageName = "manager.jsp";
	public static String paramUploadServicePageName = QuarkServletUploadService.class.getSimpleName();
	public static String paramAction = "do";
	public static String paramClass = "class";
	public static String paramCharset = "charset";
	public static String paramReturn = "return";
	public static String paramPageIndex = "pageIndex";
	public static String paramPrimaryKey = "key";
	public static String paramUserName = "userName";
	public static String paramUserPassword = "userPassword";	
	public static String paramAbove = "above";
	public static String paramBelow = "below";
	public static String paramEqual = "equal";
	public static String paramContains = "contain";
	public static String paramSearchField = "field";
	public static String paramSearchVerb = "verb";
	public static String paramSearchValue = "value";
	public static String paramLanguage = "lang";
	
	
	public static String valueAbove = "0";
	public static String valueBelow = "1";
	public static String valueEqual = "2";
	public static String valueContains = "3";
	
	public static String valueLogin = "login";
	public static String valueLogout = "logout";
		
	public static Integer privilegeNormal = 1;
	public static Integer privilegeSuper = 2;
	public static Integer privilegeZorroII = 3;
	
	public static String paramSessionMessage = "Message";
	public static String paramSessionResult = "Result";
	public static String paramPrivilegeObject = "PrivilegeObject";
	public static String paramSessionLanuage = paramLanguage;
	
	public static String errorCantCreateDir = "error_dir";
	public static String errorCantUpload = "error_upload_failed";
	public static String errorSuccess = "error_success";
	public static String errorProcess = "error_process";
	public static String errorLoginFailed = "error_login";
	public static String errorNotEnoughPrivilege = "error_privilege";
	public static String errorNotLogin = "error_not_login";
	public static String errorFieldError = "error_field_error";
	public static String errorNoSuchLogicError = "error_not_such_logic";
	public static String errorNoSuchPage = "error_not_such_page";
	
	//normal fields
	private String workingPath = "";
	private QuarkEnvironment()
	{
		
	}
	public static QuarkEnvironment getInstance()
	{
		return inst;
	}
	public void setWorkingPath(String s)
	{
		workingPath = s.replace('\\', '/');
	}
	public String getWorkingPath()
	{
		return workingPath;
	}
}
